<template>
  <div class="lend_des2">
    <span> {{ getName(status, item) }}</span>
    <slot></slot>
    
  </div>
</template>
<script setup>
import { useStore } from "vuex";
import { useI18n } from "vue-i18n";
const { locale, t } = useI18n();
const store = useStore();
const props = defineProps({
  status: {
    type: String,
    default: "",
  },
  item: {
    type: Object,
    default: () => {
      return {};
    },
  },
});
const getName = (status, item) => {
  if (status == 0) {
    // 四种提示
    if (item.orderType == 1) {
      // 借入的
      if (item.borrower == store.state.address) {
        return t('c2cOrder2')
      } else {
        return t('c2cOrder2')
      }
    } else {
      if (item.lender == store.state.address) {
        return t('c2cOrder3')
      } else {
        return t('c2cOrder3')
      }
    }
  } else if (status == 1) {
    return t('c2cHasDone')
  } else if (status == 2) {
    return t('hasResove')
  } else if (status == 3) {
    return t('orderStatus1')
  }
};
// 改变法币查询
</script>
<style lang="scss" scoped>
.status_tab {
  color: rgb(246, 109, 26);
}
.lend_des2{
  padding-top: 10px;
  padding-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
</style>
